/**
 * @file entry
 * @author kuerbb(kuerbb@aliyun.com)
 */

import Vue from 'vue'
import Meta from 'vue-meta'

import {createRouter} from '@/.lavas/router'
import {createStore} from '@/.lavas/store'
import AppComponent from './App.vue'
import {createVueI18n} from './vueI18n'

Vue.use(Meta)

Vue.config.productionTip = false

export function createApp () {
  let router = createRouter()
  let store = createStore()
  let i18n = createVueI18n()
  let App = Vue.extend({
    router,
    store,
    ...AppComponent
  })
  return {App, router, store, i18n}
}
if (module.hot) {
  module.hot.accept()
}
